package org.yefei.homeworkday16.carrentsysem;

//客车
public class Coach extends Car {

	public Coach(String brand, String cNum, double dateRent, boolean state, int seating, String type) {
		super(brand, cNum, dateRent, state, seating, type);
	}

	public Coach() {
	}

	@Override
	public double calDateRent(int day) {
		if (day >= 150) {
			return super.getDateRent() * day * 0.95;
		} else if (day >= 60) {
			return super.getDateRent() * day * 0.7;
		} else if (day >= 30) {
			return super.getDateRent() * day * 0.6;
		}
		return super.getDateRent() * day;
	}

}
